﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Buddy.BehaviorTree;
using Buddy.Common;
using Buddy.Common.Math;
using Buddy.CommonBot;
using Buddy.Navigation;
using Buddy.Swtor;
using Buddy.Swtor.Objects;

using WingIt.Routines;
using WingIt.Routines.Mirrors;

using Action = Buddy.BehaviorTree.Action;


namespace WingIt
{
    /// <summary>
    /// <para>CreateBTPS = Create Behavior Tree for PrioritySelector.</para>
    /// <para>All methods in the CreateBTPS class are designed to create Subehaviors that can be included in a PrioritySelector
    /// to accomplish the stated goal.</para>
    /// <para>Notes:<list type="bullet">
    /// <item><description><para> * Using these methods in a <c>BehaviorTree.Sequence</c> will not yield the desired results.</para></description></item>
    /// </list></para>
    /// </summary>
    [RevisionControlId("$Id: Fundamental.cs 684 2012-08-08 10:09:07Z Chinajade $")]
    public static partial class WingItCommon
    {
        public delegate float       RangeProviderDelegate(object context);
        public delegate string      StringProviderDelegate(object context);

        private static TorPlayer        Me { get { return (BuddyTor.Me); } }
        private static TorCharacter     MyTarget { get { return (TargetSelect.ForAttack()); } }

        public static bool ReloadWingIt()
        { // Neo93
            if (WingIt.PreviousPrimarySpec != Me.PrimarySpec() || WingIt.PreviousAdvancedClass != Me.AdvancedClass)
            {
                Logger.Write("Changed Spec ( old: {0}, new: {1} )", WingIt.PreviousPrimarySpec.ToString(), BuddyTor.Me.PrimarySpec().ToString());
                WingIt.PreviousPrimarySpec = BuddyTor.Me.PrimarySpec();
                WingIt.PreviousAdvancedClass = BuddyTor.Me.AdvancedClass;
                WingIt.Instance.Initialize();
            }

            return false;
        }
    }
}
